package ex2;
import java.util.Comparator;
	class WorkerComparator implements Comparator<Worker> {
	    public int compare(Worker w1,Worker w2){
	    	if(w1.getBirthday().getTime()>w2.getBirthday().getTime()){
	    		return -1;
	    	}else if(w1.getBirthday().getTime()<w2.getBirthday().getTime()){
	    		return 1;
	    	}
	    	else{
	    		return 0;
	    	}
	    }
	    }

